<template>
    <div class="top-wrap">
        <!-- 左侧品牌区域 -->
        <div class="brand-area">
            <el-icon class="brand-icon">
                <Management />
            </el-icon>
            <span class="brand-name">WMS测试平台</span>
        </div>
        
        <!-- 右侧功能区域 -->
        <div class="action-area">
            <el-dropdown>
                <span class="user-info">
                    <el-icon class="user-icon"><User /></el-icon>
                    <span>管理员</span>
                    <el-icon class="arrow-icon"><ArrowDown /></el-icon>
                </span>
                <template #dropdown>
                    <el-dropdown-menu>
                        <el-dropdown-item>个人中心</el-dropdown-item>
                        <el-dropdown-item>系统设置</el-dropdown-item>
                        <el-dropdown-item divided>退出登录</el-dropdown-item>
                    </el-dropdown-menu>
                </template>
            </el-dropdown>
        </div>
    </div>
</template>

<script setup lang="ts">
import { Management, User, ArrowDown } from '@element-plus/icons-vue';
</script>

<style scoped>
.top-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

/* 品牌区域 */
.brand-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    color: white;
    font-size: 24px;
}

.brand-name {
    color: white;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 操作区域 */
.action-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.user-icon,
.arrow-icon {
    font-size: 16px;
}
</style>
